﻿Imports FuncClasses

Public Class UpdateControl
    Public Sub New(ByVal file As UpdateFileInfo, update As UpdateProvider)
        InitializeComponent()
        VersionInfo.Text = "Version " + file.FileVersion.ToString.Replace(",", ".")
        TextBlock1.Text = file.InfoDescription
        _update = update
        _file = file
    End Sub
    Public _file As UpdateFileInfo
    Private _update As UpdateProvider

    Private Sub Button1_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click
        ProgressBar1.Visibility = Windows.Visibility.Visible
        _update.InstallUpdate(_file, ProgressBar1)
        Button1.IsEnabled = False
    End Sub
End Class
